package WhatGUI;

import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class WhatLabel extends Label {
	
	private BufferedImage image;
	
	public WhatLabel() {
		super();
	}
	
	public WhatLabel(String filename) throws IOException{
		super();
		image = ImageIO.read(new File(filename));
		setSize(image.getWidth(), image.getHeight());
	}
	
	public void setSize(){
		setSize(image.getWidth(), image.getHeight());
	}
	
	@Override
	public void paint(Graphics g) {
		g.drawImage(image, 0, 0, this);
	}
	
	
	

}
